﻿using System.Collections.Generic;

namespace WeWork.Model
{
    /// <summary>
    /// 图文消息
    /// </summary>
    public class ChatNews : MsgChatRoomBase
    {
        /*
        {
            "msgid":"118732825779547782215",
            "action":"send",
            "from":"kens",
            "tolist":["icef","test"],
            "roomid":"wrErxtDgAA0jgXE5",
            "msgtime":1603876045165,
            "msgtype":"news",
            "info":{
                "item":[
                    {"title":"service ","description":"test","url":"http://xxx","picurl":"https://www.qq.com/xxx.jpg"}
                ]
            }
        }
        */
        /// <summary>
        /// 消息内容
        /// </summary>
        public NewsInfo info { set; get; }
    }

    public class NewsInfo
    {
        /// <summary>
        /// 图文消息数组，每个item结构包含title、description、url、picurl等结构
        /// </summary>
        public List<NewsItem> item { set; get; }
    }
    public class NewsItem
    {
        /// <summary>
        /// 图文消息标题。String类型
        /// </summary>
        public string title { set; get; }
        /// <summary>
        /// 图文消息描述。String类型
        /// </summary>
        public string description { set; get; }
        /// <summary>
        /// 图文消息点击跳转地址。String类型
        /// </summary>
        public string url { set; get; }
        /// <summary>
        /// 图文消息配图的url。String类型
        /// </summary>
        public string picurl { set; get; }
    }
}
